<?php include 'includes/pagetop.php';?>
	
<?php include 'includes/navigation.php';?>

<?php include 'includes/tabletopcontainer.php';?>

{message}

	    <div id="content-table-inner">
	    	<form method="GET" action="" />
				<div>
					<table>
						<tr>
							<td>From</td>
							<td><input type="text" id="datefrom" name="datefrom" value="<?= (isset($_GET['datefrom']) ? $_GET['datefrom'] : $datetoday); ?>"  /></td>
							
							<td>To</td>
							<td><input type="text" id="dateto" name="dateto" value="<?= (isset($_GET['dateto']) ? $_GET['dateto'] : $datetoday); ?>"  /></td>
							
							<td>Mode of Payment</td>
							<td>
								<select name="modeofpayment">
									<option value="">-- Select --</option>
									<option value="ONLINEPAYMENT" <?php echo (isset($_GET['modeofpayment']) && $_GET['modeofpayment'] == 'ONLINEPAYMENT') ? 'SELECTED' : ''; ?>>Online Payment</option>
									<option value="BANKTRANSFER" <?php echo (isset($_GET['modeofpayment']) && $_GET['modeofpayment'] == 'BANKTRANSFER') ? 'SELECTED' : ''; ?>>Bank Transfer</option>
									<option value="CANCELLED" <?php echo (isset($_GET['modeofpayment']) && $_GET['modeofpayment'] == 'CANCELLED') ? 'SELECTED' : ''; ?>>Cancelled</option>
								</select>
							</td>
							
							<td><input type="submit" value="Search" /></td>
						</tr>
					</table>
				</div>
			</form>
			
			<br /><br />
			
			<!--  start table-content  -->
			<div id="table-content">
				<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
					<tr>
						<th class="table-header-repeat line-left minwidth-1"><a href="javascript:void(0)">Tenant</a></th>
						<th class="table-header-repeat line-left minwidth-1"><a href="javascript:void(0)">Item</a></th>
						<th class="table-header-repeat line-left minwidth-1"><a href="javascript:void(0)">Client</a></th>
						<th class="table-header-repeat line-left minwidth-1"><a href="javascript:void(0)">Mode of Payment</a></th>
						<th class="table-header-repeat line-left minwidth-1"><a href="javascript:void(0)">Recipient</a></th>
						<th class="table-header-repeat line-left minwidth-1"><a href="javascript:void(0)">Quantity</a></th>
						<th class="table-header-repeat line-left minwidth-1"><a href="javascript:void(0)">Total Amount</a></th>
					</tr>
					<?php if (isset($orderList)): ?>
						{orderList}
						<tr class="alternate-row">
							<td>{tenant_name}</td>
							<td>{item_name}</td>
							<td>{firstname}</td>
							<td>{modeofpayment}</td>
							<td>{receipient_fullname}</td>
							<td>{deal_item_quantity}</td>
							<td>{total_amount}</td>
						</tr>
						{/orderList}
					<?php endif; ?>
				</table>
				<!--  end order-table................................... -->
			</div>
			<!--  end content-table  -->
		
			<!--  start actions-box ............................................... -- >
			<div id="actions-box">
				<a href="" class="action-slider"></a>
				<div id="actions-box-slider">
					<a href="" class="action-edit">Edit</a>
					<a href="" class="action-delete">Delete</a>
				</div>
				<div class="clear"></div>
			</div>
			< !-- end actions-box........... -->
			
			
			<!--  start paging..................................................... -- >
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
			<td>
				<a href="" class="page-far-left"></a>
				<a href="" class="page-left"></a>
				<div id="page-info">Page <strong>1</strong> / 15</div>
				<a href="" class="page-right"></a>
				<a href="" class="page-far-right"></a>
			</td>
			<td>
			<select  class="styledselect_pages">
				<option value="">Number of rows</option>
				<option value="">1</option>
				<option value="">2</option>
				<option value="">3</option>
			</select>
			</td>
			</tr>
			</table>
			< !--  end paging................ -->
			<a href="{url}/{page}/exporttoexcel/?datefrom=<?= (isset($_GET['datefrom']) ? $_GET['datefrom'] : ''); ?>&dateto=<?= (isset($_GET['dateto']) ? $_GET['dateto'] : ''); ?>&modeofpayment=<?= (isset($_GET['modeofpayment']) ? $_GET['modeofpayment'] : ''); ?>" >Export to Excel</a> | <a href="{url}/{page}/exporttopdf/?datefrom=<?= (isset($_GET['datefrom']) ? $_GET['datefrom'] : ''); ?>&dateto=<?= (isset($_GET['dateto']) ? $_GET['dateto'] : ''); ?>&modeofpayment=<?= (isset($_GET['modeofpayment']) ? $_GET['modeofpayment'] : ''); ?>" target="_blank">Export to PDF</a>
			<div class="clear"></div>
		 
		</div>

<script type="text/javascript">
	$(function(){
		$("#datefrom,#dateto").datepicker();

		
	});

</script> 	
	
<?php include 'includes/tablebottomcontainer.php';?>